<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 数组转换为字符串
        // 1. toString() 将我们的数组转换为字符串  只能用逗号(,)进行分隔
        var arr = ['1', 'a', 3];
        console.log(arr.toString()); //1, a, 3
        // 2. join(分隔符) 可以输入分隔符进行分隔，默认是逗号(,)
        console.log(arr.join()); //1, a, 3
        console.log(arr.join("&")); //1&a&3
    </script>
</head>

<body>

</body>

</html>